using System;
using System.Data;
using System.ComponentModel;
using System.Reflection;
using System.Collections.Generic;
using DataObject.Helpers;

namespace DataObject.Model
{
    [Serializable]
    public class ReservationDTO : DTOBase
    {
        public ReservationDTO()
        {
            ReservationID = Helper.NewSeqGuid();
            ModifiedDate = DateTime.Now;
        }

        #region Collection Members

        private IList<ReservationDetailDTO> _reservationDetailCollection = new List<ReservationDetailDTO>();
        public IList<ReservationDetailDTO> ReservationDetailCollection
        {
            get
            {
                return _reservationDetailCollection;
            }
            set
            {
                if (_reservationDetailCollection != value)
                {
                    _reservationDetailCollection = value;
                    OnChanged();
                }
            }
        }
        private IList<ReservationPaymentDTO> _reservationPaymentCollection = new List<ReservationPaymentDTO>();
        public IList<ReservationPaymentDTO> ReservationPaymentCollection
        {
            get
            {
                return _reservationPaymentCollection;
            }
            set
            {
                if (_reservationPaymentCollection != value)
                {
                    _reservationPaymentCollection = value;
                    OnChanged();
                }
            }
        }
        private IList<ReservationServiceDTO> _reservationServiceCollection = new List<ReservationServiceDTO>();
        public IList<ReservationServiceDTO> ReservationServiceCollection
        {
            get
            {
                return _reservationServiceCollection;
            }
            set
            {
                if (_reservationServiceCollection != value)
                {
                    _reservationServiceCollection = value;
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property Alarm

        private DateTime? _alarm;

        /// <summary>
        ///  Property Alarm
        /// <summary>
        public DateTime? Alarm
        {
            get
            {
                return _alarm;
            }

            set
            {
                if (_alarm != value)
                {
                    this.OnAlarmChanging(value);
                    _alarm = value;
                    this.OnAlarmChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property BoatID

        private string _boatID;

        /// <summary>
        ///  Property BoatID
        /// <summary>
        public string BoatID
        {
            get
            {
                return _boatID;
            }

            set
            {
                if (_boatID != value)
                {
                    this.OnBoatIDChanging(value);
                    _boatID = value;
                    this.OnBoatIDChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property CheckInDate

        private DateTime _checkInDate;

        /// <summary>
        ///  Property CheckInDate
        /// <summary>
        public DateTime CheckInDate
        {
            get
            {
                return _checkInDate;
            }

            set
            {
                if (_checkInDate != value)
                {
                    this.OnCheckInDateChanging(value);
                    _checkInDate = value;
                    this.OnCheckInDateChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property CreatedByID

        private string _createdByID;

        /// <summary>
        ///  Property CreatedByID
        /// <summary>
        public string CreatedByID
        {
            get
            {
                return _createdByID;
            }

            set
            {
                if (_createdByID != value)
                {
                    this.OnCreatedByIDChanging(value);
                    _createdByID = value;
                    this.OnCreatedByIDChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property CreationDate

        private DateTime _creationDate;

        /// <summary>
        ///  Property CreationDate
        /// <summary>
        public DateTime CreationDate
        {
            get
            {
                return _creationDate;
            }

            set
            {
                if (_creationDate != value)
                {
                    this.OnCreationDateChanging(value);
                    _creationDate = value;
                    this.OnCreationDateChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property CruisePackage

        private decimal _cruisePackage;

        /// <summary>
        ///  Property CruisePackage
        /// <summary>
        public decimal CruisePackage
        {
            get
            {
                return _cruisePackage;
            }

            set
            {
                if (_cruisePackage != value)
                {
                    this.OnCruisePackageChanging(value);
                    _cruisePackage = value;
                    this.OnCruisePackageChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property CruiseRate

        private decimal _cruiseRate;

        /// <summary>
        ///  Property CruiseRate
        /// <summary>
        public decimal CruiseRate
        {
            get
            {
                return _cruiseRate;
            }

            set
            {
                if (_cruiseRate != value)
                {
                    this.OnCruiseRateChanging(value);
                    _cruiseRate = value;
                    this.OnCruiseRateChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property DepartureDate

        private DateTime _departureDate;

        /// <summary>
        ///  Property DepartureDate
        /// <summary>
        public DateTime DepartureDate
        {
            get
            {
                return _departureDate;
            }

            set
            {
                if (_departureDate != value)
                {
                    this.OnDepartureDateChanging(value);
                    _departureDate = value;
                    this.OnDepartureDateChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property Deposit

        private decimal _deposit;

        /// <summary>
        ///  Property Deposit
        /// <summary>
        public decimal Deposit
        {
            get
            {
                return _deposit;
            }

            set
            {
                if (_deposit != value)
                {
                    this.OnDepositChanging(value);
                    _deposit = value;
                    this.OnDepositChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property ExtraService

        private decimal _extraService;

        /// <summary>
        ///  Property ExtraService
        /// <summary>
        public decimal ExtraService
        {
            get
            {
                return _extraService;
            }

            set
            {
                if (_extraService != value)
                {
                    this.OnExtraServiceChanging(value);
                    _extraService = value;
                    this.OnExtraServiceChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property GuestID

        private string _guestID;

        /// <summary>
        ///  Property GuestID
        /// <summary>
        public string GuestID
        {
            get
            {
                return _guestID;
            }

            set
            {
                if (_guestID != value)
                {
                    this.OnGuestIDChanging(value);
                    _guestID = value;
                    this.OnGuestIDChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property HotelAddress

        private string _hotelAddress;

        /// <summary>
        ///  Property HotelAddress
        /// <summary>
        public string HotelAddress
        {
            get
            {
                return _hotelAddress;
            }

            set
            {
                if (_hotelAddress != value)
                {
                    this.OnHotelAddressChanging(value);
                    _hotelAddress = value;
                    this.OnHotelAddressChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property IsCharter

        private bool _isCharter;

        /// <summary>
        ///  Property IsCharter
        /// <summary>
        public bool IsCharter
        {
            get
            {
                return _isCharter;
            }

            set
            {
                if (_isCharter != value)
                {
                    this.OnIsCharterChanging(value);
                    _isCharter = value;
                    this.OnIsCharterChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property IsShuttle

        private bool _isShuttle;

        /// <summary>
        ///  Property IsShuttle
        /// <summary>
        public bool IsShuttle
        {
            get
            {
                return _isShuttle;
            }

            set
            {
                if (_isShuttle != value)
                {
                    this.OnIsShuttleChanging(value);
                    _isShuttle = value;
                    this.OnIsShuttleChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property ModifiedByID

        private string _modifiedByID;

        /// <summary>
        ///  Property ModifiedByID
        /// <summary>
        public string ModifiedByID
        {
            get
            {
                return _modifiedByID;
            }

            set
            {
                if (_modifiedByID != value)
                {
                    this.OnModifiedByIDChanging(value);
                    _modifiedByID = value;
                    this.OnModifiedByIDChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property ModifiedDate

        private DateTime _modifiedDate;

        /// <summary>
        ///  Property ModifiedDate
        /// <summary>
        public DateTime ModifiedDate
        {
            get
            {
                return _modifiedDate;
            }

            set
            {
                if (_modifiedDate != value)
                {
                    this.OnModifiedDateChanging(value);
                    _modifiedDate = value;
                    this.OnModifiedDateChanged();
                }
            }
        }

        #endregion

        #region Property Note

        private string _note;

        /// <summary>
        ///  Property Note
        /// <summary>
        public string Note
        {
            get
            {
                return _note;
            }

            set
            {
                if (_note != value)
                {
                    this.OnNoteChanging(value);
                    _note = value;
                    this.OnNoteChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property NumOfCabins

        private int _numOfCabins;

        /// <summary>
        ///  Property NumOfCabins
        /// <summary>
        public int NumOfCabins
        {
            get
            {
                return _numOfCabins;
            }

            set
            {
                if (_numOfCabins != value)
                {
                    this.OnNumOfCabinsChanging(value);
                    _numOfCabins = value;
                    this.OnNumOfCabinsChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property NumOfNights

        private int _numOfNights;

        /// <summary>
        ///  Property NumOfNights
        /// <summary>
        public int NumOfNights
        {
            get
            {
                return _numOfNights;
            }

            set
            {
                if (_numOfNights != value)
                {
                    this.OnNumOfNightsChanging(value);
                    _numOfNights = value;
                    this.OnNumOfNightsChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property NumOfPax

        private int _numOfPax;

        /// <summary>
        ///  Property NumOfPax
        /// <summary>
        public int NumOfPax
        {
            get
            {
                return _numOfPax;
            }

            set
            {
                if (_numOfPax != value)
                {
                    this.OnNumOfPaxChanging(value);
                    _numOfPax = value;
                    this.OnNumOfPaxChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property Paid

        private decimal _paid;

        /// <summary>
        ///  Property Paid
        /// <summary>
        public decimal Paid
        {
            get
            {
                return _paid;
            }

            set
            {
                if (_paid != value)
                {
                    this.OnPaidChanging(value);
                    _paid = value;
                    this.OnPaidChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property PaidFee

        private decimal _paidFee;

        /// <summary>
        ///  Property PaidFee
        /// <summary>
        public decimal PaidFee
        {
            get
            {
                return _paidFee;
            }

            set
            {
                if (_paidFee != value)
                {
                    this.OnPaidFeeChanging(value);
                    _paidFee = value;
                    this.OnPaidFeeChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property PaidStatus

        private bool _paidStatus;

        /// <summary>
        ///  Property PaidStatus
        /// <summary>
        public bool PaidStatus
        {
            get
            {
                return _paidStatus;
            }

            set
            {
                if (_paidStatus != value)
                {
                    this.OnPaidStatusChanging(value);
                    _paidStatus = value;
                    this.OnPaidStatusChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property Pickup

        private bool _pickup;

        /// <summary>
        ///  Property Pickup
        /// <summary>
        public bool Pickup
        {
            get
            {
                return _pickup;
            }

            set
            {
                if (_pickup != value)
                {
                    this.OnPickupChanging(value);
                    _pickup = value;
                    this.OnPickupChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property ReservationCode

        private string _reservationCode;

        /// <summary>
        ///  Property ReservationCode
        /// <summary>
        public string ReservationCode
        {
            get
            {
                return _reservationCode;
            }

            set
            {
                if (_reservationCode != value)
                {
                    this.OnReservationCodeChanging(value);
                    _reservationCode = value;
                    this.OnReservationCodeChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property ReservationID

        private Guid _reservationID;

        /// <summary>
        ///  Property ReservationID
        /// <summary>
        public Guid ReservationID
        {
            get
            {
                return _reservationID;
            }

            set
            {
                if (_reservationID != value)
                {
                    this.OnReservationIDChanging(value);
                    _reservationID = value;
                    this.OnReservationIDChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property RouteNumber

        private int _routeNumber;

        /// <summary>
        ///  Property RouteNumber
        /// <summary>
        public int RouteNumber
        {
            get
            {
                return _routeNumber;
            }

            set
            {
                if (_routeNumber != value)
                {
                    this.OnRouteNumberChanging(value);
                    _routeNumber = value;
                    this.OnRouteNumberChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property ShuttlePrice

        private decimal _shuttlePrice;

        /// <summary>
        ///  Property ShuttlePrice
        /// <summary>
        public decimal ShuttlePrice
        {
            get
            {
                return _shuttlePrice;
            }

            set
            {
                if (_shuttlePrice != value)
                {
                    this.OnShuttlePriceChanging(value);
                    _shuttlePrice = value;
                    this.OnShuttlePriceChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property CruiseCurrency

        private int _cruiseCurrency;

        /// <summary>
        ///  Property CruiseCurrency
        /// <summary>
        public int CruiseCurrency
        {
            get
            {
                return _cruiseCurrency;
            }

            set
            {
                if (_cruiseCurrency != value)
                {
                    this.OnCruiseCurrencyChanging(value);
                    _cruiseCurrency = value;
                    this.OnCruiseCurrencyChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property Status

        private int _status;

        /// <summary>
        ///  Property Status
        /// <summary>
        public int Status
        {
            get
            {
                return _status;
            }

            set
            {
                if (_status != value)
                {
                    this.OnStatusChanging(value);
                    _status = value;
                    this.OnStatusChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property SubRouteCode

        private char? _subRouteCode;

        /// <summary>
        ///  Property SubRouteCode
        /// <summary>
        public char? SubRouteCode
        {
            get
            {
                return _subRouteCode;
            }

            set
            {
                if (_subRouteCode != value)
                {
                    this.OnSubRouteCodeChanging(value);
                    _subRouteCode = value;
                    this.OnSubRouteCodeChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property SubTotal

        private decimal _subTotal;

        /// <summary>
        ///  Property SubTotal
        /// <summary>
        public decimal SubTotal
        {
            get
            {
                return _subTotal;
            }

            set
            {
                if (_subTotal != value)
                {
                    this.OnSubTotalChanging(value);
                    _subTotal = value;
                    this.OnSubTotalChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property ConfirmationEmail

        private string _confirmationEmail;

        /// <summary>
        ///  Property ConfirmationEmail
        /// <summary>
        public string ConfirmationEmail
        {
            get
            {
                return _confirmationEmail;
            }

            set
            {
                if (_confirmationEmail != value)
                {
                    this.OnConfirmationEmailChanging(value);
                    _confirmationEmail = value;
                    this.OnConfirmationEmailChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Extensibility Method Declarations

        protected virtual void OnAlarmChanging(DateTime? alarm) { }
        protected virtual void OnAlarmChanged() { }
        protected virtual void OnBoatIDChanging(string boatID) { }
        protected virtual void OnBoatIDChanged() { }
        protected virtual void OnCheckInDateChanging(DateTime checkInDate) { }
        protected virtual void OnCheckInDateChanged() { }
        protected virtual void OnCreatedByIDChanging(string createdByID) { }
        protected virtual void OnCreatedByIDChanged() { }
        protected virtual void OnCreationDateChanging(DateTime creationDate) { }
        protected virtual void OnCreationDateChanged() { }
        protected virtual void OnCruisePackageChanging(decimal cruisePackage) { }
        protected virtual void OnCruisePackageChanged() { }
        protected virtual void OnCruiseRateChanging(decimal cruiseRate) { }
        protected virtual void OnCruiseRateChanged() { }
        protected virtual void OnDepartureDateChanging(DateTime? departureDate) { }
        protected virtual void OnDepartureDateChanged() { }
        protected virtual void OnDepositChanging(decimal deposit) { }
        protected virtual void OnDepositChanged() { }
        protected virtual void OnExtraServiceChanging(decimal extraService) { }
        protected virtual void OnExtraServiceChanged() { }
        protected virtual void OnGuestIDChanging(string guestID) { }
        protected virtual void OnGuestIDChanged() { }
        protected virtual void OnHotelAddressChanging(string hotelAddress) { }
        protected virtual void OnHotelAddressChanged() { }
        protected virtual void OnIsCharterChanging(bool isCharter) { }
        protected virtual void OnIsCharterChanged() { }
        protected virtual void OnIsShuttleChanging(bool isShuttle) { }
        protected virtual void OnIsShuttleChanged() { }
        protected virtual void OnModifiedByIDChanging(string modifiedByID) { }
        protected virtual void OnModifiedByIDChanged() { }
        protected virtual void OnModifiedDateChanging(DateTime modifiedDate) { }
        protected virtual void OnModifiedDateChanged() { }
        protected virtual void OnNoteChanging(string note) { }
        protected virtual void OnNoteChanged() { }
        protected virtual void OnNumOfCabinsChanging(int numOfCabins) { }
        protected virtual void OnNumOfCabinsChanged() { }
        protected virtual void OnNumOfNightsChanging(int numOfNights) { }
        protected virtual void OnNumOfNightsChanged() { }
        protected virtual void OnNumOfPaxChanging(int numOfPax) { }
        protected virtual void OnNumOfPaxChanged() { }
        protected virtual void OnPaidChanging(decimal paid) { }
        protected virtual void OnPaidChanged() { }
        protected virtual void OnPaidFeeChanging(decimal paidFee) { }
        protected virtual void OnPaidFeeChanged() { }
        protected virtual void OnPaidStatusChanging(bool paidStatus) { }
        protected virtual void OnPaidStatusChanged() { }
        protected virtual void OnPaymentMethodChanging(int paymentMethod) { }
        protected virtual void OnPaymentMethodChanged() { }
        protected virtual void OnPickupChanging(bool pickup) { }
        protected virtual void OnPickupChanged() { }
        protected virtual void OnReservationCodeChanging(string reservationCode) { }
        protected virtual void OnReservationCodeChanged() { }
        protected virtual void OnReservationIDChanging(Guid reservationID) { }
        protected virtual void OnReservationIDChanged() { }
        protected virtual void OnRouteNumberChanging(int routeNumber) { }
        protected virtual void OnRouteNumberChanged() { }
        protected virtual void OnServiceRateChanging(decimal serviceRate) { }
        protected virtual void OnServiceRateChanged() { }
        protected virtual void OnShuttlePriceChanging(decimal shuttlePrice) { }
        protected virtual void OnShuttlePriceChanged() { }
        protected virtual void OnShuttleRateChanging(decimal shuttleRate) { }
        protected virtual void OnShuttleRateChanged() { }
        protected virtual void OnShuttleCurrencyChanging(int shuttleCurrency) { }
        protected virtual void OnShuttleCurrencyChanged() { }
        protected virtual void OnServiceCurrencyChanging(int serviceCurrency) { }
        protected virtual void OnServiceCurrencyChanged() { }
        protected virtual void OnCruiseCurrencyChanging(int cruiseCurrency) { }
        protected virtual void OnCruiseCurrencyChanged() { }
        protected virtual void OnStatusChanging(int status) { }
        protected virtual void OnStatusChanged() { }
        protected virtual void OnSubRouteCodeChanging(char? subRouteCode) { }
        protected virtual void OnSubRouteCodeChanged() { }
        protected virtual void OnSubTotalChanging(decimal subTotal) { }
        protected virtual void OnSubTotalChanged() { }
        protected virtual void OnConfirmationEmailChanging(string confirmationEmail) { }
        protected virtual void OnConfirmationEmailChanged() { }

        #endregion

    }
}
